package com.luca.framework.web.service;

import com.luca.common.CustomerUserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * 自定义用户详情类
 *
 * @author luca
 */
public interface CustomerUserDetailService extends UserDetailsService {

    /**
     * 根据租户代码和用户名查询用户信息
     *
     * @param code     租户代码
     * @param username 用户名
     * @return
     * @throws UsernameNotFoundException
     */
    CustomerUserDetails loadUserByCodeAndUsername(String code, String username) throws UsernameNotFoundException;
}
